'use strict'

const Koa = require('koa')
const bodyparser = require('koa-bodyparser')
const cors = require('koa-cors')  // 跨域用的
const router = require('./routes')


let app = new Koa()

app.use(cors())
app.use(bodyparser())
app.use(router.routes())

let port = 8000
app.listen(port)
console.log(`Server is running http://localhost:${port}`);